/*   1:    */ package com.rinsi.core.service;
/*   2:    */ 
/*   3:    */ import com.rinsi.util.MapUtil;
/*   4:    */ import java.util.Map;
/*   5:    */ import org.apache.log4j.Logger;
/*   6:    */ import org.mybatis.spring.SqlSessionTemplate;
/*   7:    */ import org.mybatis.spring.support.SqlSessionDaoSupport;
/*   8:    */ 
/*   9:    */ public abstract class CoreService
/*  10:    */   extends SqlSessionDaoSupport
/*  11:    */ {
/*  12: 29 */   private static Logger logger = Logger.getLogger(CoreService.class);
/*  13:    */   
/*  14:    */   public void afterIndex(Map<String, Object> model, Map<String, Object> rMap) {}
/*  15:    */   
/*  16:    */   public Map<String, Object> index(Map<String, Object> model)
/*  17:    */   {
/*  18: 41 */     Map<String, Object> rMap = MapUtil.createReturnMap(Boolean.valueOf(true));
/*  19:    */     
/*  20: 43 */     afterIndex(model, rMap);
/*  21: 45 */     if (logger.isDebugEnabled()) {
/*  22: 47 */       logger.debug("index提交信息：" + MapUtil.json(model) + "和返回信息" + MapUtil.json(rMap));
/*  23:    */     }
/*  24: 51 */     return rMap;
/*  25:    */   }
/*  26:    */   
/*  27:    */   public Map<String, Object> getParams(Map<String, Object> model)
/*  28:    */   {
/*  29: 63 */     if (logger.isDebugEnabled()) {
/*  30: 65 */       logger.debug("params信息：" + MapUtil.getMapData(model, "params"));
/*  31:    */     }
/*  32: 69 */     return MapUtil.getMapData(model, "params");
/*  33:    */   }
/*  34:    */   
/*  35:    */   public Map<String, Object> getSession(Map<String, Object> model)
/*  36:    */   {
/*  37: 82 */     if (logger.isDebugEnabled()) {
/*  38: 84 */       logger.debug("session信息：" + MapUtil.getMapData(model, "session"));
/*  39:    */     }
/*  40: 88 */     return MapUtil.getMapData(model, "session");
/*  41:    */   }
/*  42:    */   
/*  43:    */   public Map<String, Object> getAttr(Map<String, Object> model)
/*  44:    */   {
/*  45:101 */     if (logger.isDebugEnabled()) {
/*  46:103 */       logger.debug("attr信息：" + MapUtil.getMapData(model, "attr"));
/*  47:    */     }
/*  48:107 */     return MapUtil.getMapData(model, "attr");
/*  49:    */   }
/*  50:    */   
/*  51:    */   public Map<String, Object> getConfig(Map<String, Object> model)
/*  52:    */   {
/*  53:120 */     if (logger.isDebugEnabled()) {
/*  54:122 */       logger.debug("config信息：" + MapUtil.getMapData(model, "config"));
/*  55:    */     }
/*  56:126 */     return MapUtil.getMapData(model, "config");
/*  57:    */   }
/*  58:    */   
/*  59:    */   public Map<String, Object> getRMap()
/*  60:    */   {
/*  61:138 */     return MapUtil.createReturnMap(Boolean.valueOf(true));
/*  62:    */   }
/*  63:    */   
/*  64:    */   public String namespace(Map<String, Object> config)
/*  65:    */   {
/*  66:150 */     if (logger.isDebugEnabled()) {
/*  67:152 */       logger.debug("namespace信息：" + MapUtil.getString(config, "module.namespace"));
/*  68:    */     }
/*  69:156 */     return MapUtil.getString(config, "module.namespace");
/*  70:    */   }
/*  71:    */   
/*  72:    */   public String getKey(Map<String, Object> config)
/*  73:    */   {
/*  74:168 */     String namespace = namespace(config);
/*  75:    */     
/*  76:170 */     Integer key = (Integer)getSqlSessionTemplate().selectOne("core.getKey", namespace);
/*  77:172 */     if (logger.isDebugEnabled()) {
/*  78:174 */       logger.debug("namespace信息：" + namespace + "主键数据：" + key);
/*  79:    */     }
/*  80:178 */     return String.valueOf(key);
/*  81:    */   }
/*  82:    */ }


/* Location:           D:\Users\Desktop\shanxi\项目\sxazmis\WEB-INF\classes\
 * Qualified Name:     com.rinsi.core.service.CoreService
 * JD-Core Version:    0.7.0.1
 */